<?php
namespace app\admin\model;

use think\Model;

class Contract extends Model
{
    //protected $insert  = [''];
    //protected $update = [''];
	public function Project(){
		return $this->hasOne('project','id','project_id')->field('project_name');
	}
	
    public function setExpiretimeAttr($value){
		return strtotime($value);
	}
	
	public function getExpiretimeAttr($value){
		if(empty($value)){
			return '';
		}
		return date('Y-m-d H:i:s',$value);
	}
}